<!DOCTYPE html>
<html lang="en">
<body>
	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script>
		(function($) {
			$('<div><a></a></div>').find('a').text('jQuery').attr('href',
					'http://www.jquery.com');
		})(jQuery);
	</script>
</body>
</html>